Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

glob-stream

Package Overview
Dependencies
Maintainers
3
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glob-stream

A wrapper around node-glob to make it streamy

  • 5.3.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.7M
decreased by-32.14%
Maintainers
3
Weekly downloads
 
Created

What is glob-stream?

The glob-stream npm package allows for reading file paths from a globbing pattern. It is a wrapper around node-glob and vinyl-fs to stream the file objects that match the glob patterns. This package is particularly useful in build processes and file manipulation scripts where matching files based on patterns is required.

What are glob-stream's main functionalities?

Reading files using glob patterns

This feature allows you to read files that match a specific pattern. In the code sample, all JavaScript files under the 'src' directory and its subdirectories are matched and their paths are logged.

const globStream = require('glob-stream');

const stream = globStream('./src/**/*.js');
stream.on('data', function(file) {
  console.log(file.path);
});

Combining multiple glob patterns

glob-stream supports combining multiple patterns, including exclusion patterns. In this example, all JavaScript files under 'src' except those in the 'vendor' subdirectory are matched.

const globStream = require('glob-stream');

const stream = globStream(['./src/**/*.js', '!./src/vendor/**']);
stream.on('data', function(file) {
  console.log(file.path);
});

Other packages similar to glob-stream

Keywords

FAQs

Package last updated on 07 Sep 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc